﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StrategyGame
{
    public class CharacterStats
    {
        public int MaxHealth;
        public int Health;
        public int RushRange { get { return RushStat.Value; } }
        public int Attack { get { return AttackStat.Value; } }
        public int Defense { get { return DefenseStat.Value; } }

        public StatModifier RushStat;
        public StatModifier AttackStat;
        public StatModifier DefenseStat;

        public CharacterStats(int health, int rush, int attack, int defense)
        {
            RushStat = new StatModifier(rush);
            AttackStat = new StatModifier(attack);
            DefenseStat = new StatModifier(defense);
            Health = health;
            MaxHealth = health;
        }

        public CharacterStats GetInstance()
        {
            return new CharacterStats ( this.MaxHealth, RushStat.Base, AttackStat.Base ,  DefenseStat.Base );
        }
    }

    public class StatModifier
    {
        public int Base;
        public int? Modifier;
        public int Value{get {return Base + Modifier??0;}}
        public StatModifier(int baseStat)
        {
            Base = baseStat;
        }
    }

   
}
